<template>
    <div>
        <h1>{{ count }}</h1>
        <button @click="increase()">+1</button>
        <button @click="$emit('increase', -1)">-1</button>
    </div>
</template>

<script setup>
const props = defineProps({
    count: {
        type: Number,
        required: false,
        default: 0
    }
})
const emit = defineEmits(['increase'])

function increase() {
    emit('increase', 1)
}
</script>
